<template>
	<view class="content">
		<view class="title">
			{{detail.title}}
		</view>
		<view class="desction">
			<rich-text :nodes="detail.content"></rich-text>
		</view>
		<view class="time">
			{{$framDate.to_timeStemp(detail.createtime,2)}}
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				detail: {
					title: '',
					content:'',
					createtime: 0
				}
			}
		},
		onLoad(option) {
			this.load(option.id)
		},
		methods:{
			async load(id){
				let res = await this.api.uniRequ(this.api.common.informDetail,{id: id},'get');
				if(res.code == 1){
					this.detail = res.data;
					uni.setNavigationBarTitle({
						title:res.data.title
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.content{
		width: 90%;
		padding: 85rpx 5% 0 5%;
	}
	.title{
		width: 100%;
		height: 75rpx;
		line-height: 75rpx;
		color: #4B4E58;
		font-size: 27rpx;
	}
	.desction{
		width: 100%;
		color: #9498A5;
		font-size: 23rpx;
	}
	.time{
		width: 100%;
		height: 75rpx;
		line-height: 75rpx;
		text-align: right;
		font-size: 23rpx;
		color: #B6B6B6;
	}
</style>
